package com.tsmti.system.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.tsmti.core.common.entity.AbstractEntity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.util.Date;

/**
 * @Package：com.tsmti.system.entity
 * @Class：BillField
 * @Description： TODO
 * @Author：zcw
 * @Date：Created in 2018/6/12 11:56
 * @Company:
 * @Version：
 * @Modified By:
 */
@Entity
@Table(name = "PIMS_BILLFIELD")
@DynamicInsert
@DynamicUpdate
public class BillField extends AbstractEntity<Long> {
    private static final Long serialVersionUID = 7956258079691981669L;
    private Long id;
    private Integer billId;
    private String displayName;
    private Integer sortId;
    private String controlType;
    private String defaultValue;
    private Long dictId;
    private Integer isEnable;
    private Integer isDelete;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date lastModifyTime;
    private String lastModifyUser;
    private String fieldName;
    private String detailValue;
    private String gridList;

    private Integer level;
    private Integer isLeaf;

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_BILLFIELD")
    @SequenceGenerator(name = "SEQ_BILLFIELD", sequenceName = "BILLFIELD_SEQUENCE", allocationSize = 1)
    @Override
    public Long getId() {
        return id;
    }

    @Override
    public void setId(Long id) {
        this.id = id;
    }

    public Integer getBillId() {
        return billId;
    }

    public void setBillId(Integer billId) {
        this.billId = billId;
    }


    public Integer getSortId() {
        return sortId;
    }

    public void setSortId(Integer sortId) {
        this.sortId = sortId;
    }

    public String getControlType() {
        return controlType;
    }

    public void setControlType(String controlType) {
        this.controlType = controlType;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public Long getDictId() {
        return dictId;
    }

    public void setDictId(Long dictId) {
        this.dictId = dictId;
    }

    public Integer getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(Integer isEnable) {
        this.isEnable = isEnable;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Date getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(Date lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }

    public String getLastModifyUser() {
        return lastModifyUser;
    }

    public void setLastModifyUser(String lastModifyUser) {
        this.lastModifyUser = lastModifyUser;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public String getDetailValue() {
        return detailValue;
    }

    public void setDetailValue(String detailValue) {
        this.detailValue = detailValue;
    }

    public String getGridList() {
        return gridList;
    }

    public void setGridList(String gridList) {
        this.gridList = gridList;
    }

    @Transient
    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    @Transient
    public Integer getIsLeaf() {
        return isLeaf;
    }

    public void setIsLeaf(Integer isLeaf) {
        this.isLeaf = isLeaf;
    }
}